<%@page import="member.MemberVo"%>
<%@page import="java.util.Vector"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list.jsp</title>
<style>
#list_title{}
#list_mid{display:inline-block;width:100px;background-color:#bbbbbb;}
#list_pwd{display:inline-block;width:200px;background-color:#bbbbbb;}


.item_mid{display:inline-block;width:100px;}
.item_pwd{display:inline-block;width:200px;}

</style>

<script>
function getId(id){return document.getElementById(id);}

function init(){
	getId('btnFind').onclick=findFunc;
	getId('find').onkeyup=function(ev){

		if(ev.keyCode==13) findFunc;
		
	}
}
function findFunc(){
	var find=getId('find').value;
	location.href='index2.jsp?inc_content=./jsp/list.jsp&mid='+find;
	
}


</script>
</head>
<body>
<jsp:useBean id="bean" class="member.Login" scope="page"/>
<jsp:setProperty property="*" name="bean"/>

<% Vector<MemberVo> v= bean.list();%>



<h1>회원현황</h1>
<label>총원 :</label><output id='memberCnt' ><%=v.size() %></output><p/>
<div id='find_div'>
	<input type="search" id='find' value='<%=bean.getMid()%>'>
	<input type="button" id='btnFind' value='검색'>
</div>	
<p/>	

<div id='list_body'>
	<div id='list_title'></div>
		<div id='list_mid'>아이디</div>
		<div id='list_pwd'>암호</div>
	</div>
	
	<%for(int i=0; i<v.size(); i++){
		MemberVo m= v.get(i);%>
	
	
	<div class='list_item'>
		<div class='item_mid'><a href='index2.jsp?inc_content=./jsp/view.jsp&mid=<%=m.getMid() %>'><%=m.getMid() %></a></div>
		<div class='item_pwd'><%=m.getPwd() %></div>
	</div>	
	<% }%>	

	
</div>
<script>
init()
</script>
</body>
</html>